package com.jf3q.front.controller;

import com.jf3q.common.vo.ResultVo;
import com.jf3q.common.vo.SubjectVo;
import com.jf3q.front.service.SubjectService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
@RequestMapping("/subject")
public class SubjectController {
    @Autowired
    SubjectService subjectService;

    @GetMapping("/getAllSubject")
    @Operation(summary = "树形显示课程分类列表")
    public ResultVo getAllSubject(){
        List<SubjectVo> subjects= subjectService.getAllSubject();

        return ResultVo.success("查看分类列表",subjects);
    }
}
